<!-- 填写和修改用户信息 -->
<route lang="json5">
{
  style: {
    // navigationStyle: 'custom',
    navigationBarTitleText: '填写信息',
  },
}
</route>

<template>
  <view class="overflow-hidden bg-blue" :style="{ marginTop: safeAreaInsets?.top + 'px' }">
    <view class="form-wrapper">
      <van-form @submit="onSubmit">
        <van-cell-group>
          <FieldText
            v-model="username"
            name="申请人姓名"
            label="申请人姓名"
            placeholder="请输入申请人姓名"
            :rules="[{ required: true, message: '请输入申请人姓名' }]"
            required
          />
          <van-field
            class="filed-padding16"
            v-model="username"
            name="申请人姓名"
            label="申请人姓名"
            placeholder="请输入申请人姓名"
            :rules="[{ required: true, message: '请输入申请人姓名' }]"
            required
          />
          <van-field
            class="filed-padding16"
            v-model="username"
            name="申请人年龄"
            label="申请人年龄"
            placeholder="请输入年龄"
            :rules="[{ required: true, message: '请输入年龄' }]"
            required
          />
          <!-- <van-field
            v-model="username"
            is-link
            readonly
            name="area"
            label="工作城市"
            placeholder="请选择城市"
            @click="showArea = true"
          />
          <van-popup v-model:show="showArea" position="bottom">
            <van-area :area-list="areaList" @confirm="onConfirm" @cancel="showArea = false" />
          </van-popup> -->
          <van-field name="radio" label="学历信息" required class="filed-wrap filed-padding16">
            <template #input>
              <van-radio-group direction="horizontal">
                <van-radio name="1">高中及以下</van-radio>
                <van-radio name="2">大专</van-radio>
                <van-radio name="3">本科</van-radio>
                <van-radio name="4">研究生及以上</van-radio>
              </van-radio-group>
            </template>
          </van-field>
          <van-field name="radio" label="单位类型" required>
            <template #input>
              <van-radio-group direction="horizontal">
                <van-radio name="1">普通企业</van-radio>
                <van-radio name="2">事业单位</van-radio>
                <van-radio name="3">上市公司</van-radio>
                <van-radio name="4">政府机关</van-radio>
                <van-radio name="5">500强公司</van-radio>
                <van-radio name="6">高风险行业</van-radio>
                <van-radio name="7">国有企业</van-radio>
                <van-radio name="8">其他</van-radio>
              </van-radio-group>
            </template>
          </van-field>
          <van-field name="radio" label="税前收入（年）" labelClass="8889">
            <template #input>
              <van-radio-group direction="horizontal">
                <van-radio name="1">0-49999元</van-radio>
                <van-radio name="2">50000-100000元</van-radio>
                <van-radio name="3">100000-150000元</van-radio>
                <van-radio name="4">150000-200000元</van-radio>
                <van-radio name="5">200000-250000元</van-radio>
                <van-radio name="6">250000-300000元</van-radio>
                <van-radio name="7">300000元以上</van-radio>
              </van-radio-group>
            </template>
          </van-field>
        </van-cell-group>
      </van-form>
    </view>
  </view>
</template>

<script lang="ts" setup>
import FieldText from '../../components/fieldText/index.vue'
import { ref } from 'vue'

defineOptions({
  name: 'editMsg',
})

// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()

const username = ref('')

// 提交
const onSubmit = () => {
  alert(7)
}
</script>

<style></style>
